<?php 

	$username = $_POST['uv'];

	$pdo = new PDO('mysql:host=localhost;dbname=pass;charset=utf8','root','');

	$sql = "select * from user where username='{$username}'";

	//执行
	$stmt = $pdo->query($sql);

	//
	$res = $stmt->fetch(PDO::FETCH_ASSOC);

	if($res){

		echo 1;
	} else {

		echo 0;
	}
	



